home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Newton / Resources / Creative Digital Systems / CreativeDig.sit / SLReview.txt < prev    next >
Encoding:
Text File  |  1994-11-22  |  10.3 KB  |  182 lines  |  [TEXT/R*ch]

  1. ScriptLink Developer’s Kit
  2. Scott L Sbihli
  3. Procter & Gamble
  4. exotics@eecs.umich.edu
  5.  
  6. THIS ARTICLE WAS FIRST PUBLISHED IN PDA DEVELOPERS (FORMERLY PIE DEVELOPERS)
  7. MAGAZINE. COPYRIGHT (C) 1994 BY CREATIVE DIGITAL SYSTEMS. ALL RIGHTS RESERVED.
  8. CONTACT CREATIVE DIGITAL SYSTEMS AT CDS@NETCOM.COM FOR MORE INFORMATION. 
  9.  
  10. Rating    4 1/2 (on a scale of 5)
  11. Pros    Easy to integrate, limitless possibilities
  12. Cons    2K packet limit
  13. Price    SDK (10 Clients, 1 Server): $450
  14.     Additional server or 10-client pack: $300
  15.     Site and Volume Licenses Available
  16.  
  17.     Momentum Pty.. Ltd.
  18.     P.O. Box 271
  19.     Greenwood 6024
  20.     Australia
  21.     +61.9.483.2649
  22.     +61.9.227.5447 (fax)
  23.     momentum@dialix.oz.au
  24.  
  25. When I first read about ScriptLink in PIE Developers magazine, I thought to
  26. myself, “Being able to control Mac applications from the Newton would be
  27. interesting, novel.” After I received the package in the mail and started
  28. reading the accompanying documentation I got greatly excited. Fantastic
  29. visions of undiscovered software country danced in my head. This developer’s
  30. package would be the answer to all of my research group’s Newton troubles,
  31. not to mention that this product could spawn new software companies
  32. single-handedly. Mind you, I write this paragraph even before I’ve tested the
  33. package. Now that's confidence.
  34.  
  35. Apple What?
  36. I certainly realize that the majority of you who are reading this article
  37. know about AppleScript and probably have programmed with it, but for the rest
  38. you, let me explain what it is. In a ceaseless effort to integrate
  39. applications and data on the Macintosh, Apple created a powerful scripting
  40. language called AppleScript that runs under System 7. If you think of a
  41. Macintosh application as a tile in a bathroom, then AppleScript is the grout
  42. that connects the tiles. An application is considered scriptable if it
  43. accepts Apple Events. Apple Events are generated from AppleScripts. Got that?
  44. The whole idea is that you, as a user, can create easy, but powerful scripts
  45. to control applications. For instance, you could create a script that opens a
  46. database, queries it for data, and sends the results to a graphing program
  47. for visualization.  
  48.     Enter the wireless age. Imagine a version of Apple Remote Access for the
  49. Newton. It dials a PCMCIA modem for access to an AppleTalk network. A
  50. salesman in the field, using a Newton, could receive sales quotes, detailed
  51. product information or pricing via ScriptLink and a scriptable database on
  52. the Macintosh. This product could make some of Newton’s memory limitations
  53. moot. Wireless makes for some very interesting software scenarios. I digress.
  54.  
  55. The Sum of the Parts
  56. ScriptLink by Momentum Pty. Ltd. is an application for the Newton which
  57. allows you to control Apple-scriptable Macintosh applications (see Figure 1).
  58. The software contains both a Macintosh and Newton portion. The ScriptLink
  59. server, which runs on a Macintosh, waits for script commands to come from one
  60. or more ScriptLink clients (Newtons) via an AppleTalk connection. As it
  61. receives scripts, it executes those scripts on the Mac, packages the results
  62. and sends them to the Newton. The Newton can do anything it likes with the
  63. results.
  64.  
  65. All For One Low Price
  66. What I received from Momentum was definitely not what I had expected.
  67. Considering that this is a fairly expensive developer’s product, I had
  68. anticipated a weighty cardboard box with volumes of information on using
  69. ScriptLink – the user guide spanned a mere 40 pages. Great, another
  70. developer’s product with terse, unreadable documentation. 
  71.  
  72. The Instructions
  73. As I sat at my Mac and installed the software, which comes on one high
  74. density disk, I started reading the developer’s guide. It starts with “About
  75. This Guide” and includes a subheading titled “Audience.” Now I’ve started to
  76. lose my apprehensions. It seems as if a significant amount of time was spent
  77. writing the manual. 
  78.     The documentation covers installation and configuration of both the
  79. server and client pieces of the software. The next section is a reference
  80. guide with a list of all of the available functions you can use.  Following
  81. the reference chapter is a step-by-step instruction guide for creating and
  82. controlling connections. In addition, the manual describes the sample code
  83. that accompanies the product and has information on troubleshooting and
  84. debugging. Overall, the documentation is extremely well done and as an added
  85. bonus fits in 40 pages.
  86.  
  87. The Client and Server
  88. The ScriptLink Server needs to run continuously on a Macintosh. It occupies
  89. 128K on disk and should be placed in the Startup folder so that it is always
  90. available. It patiently waits for Newtons to connect and send it
  91. AppleScripts. The Server has security functions to protect your Macintosh
  92. from destructive, wireless Newton users (it could happen). You may set the
  93. Server to not allow anyone access, allow everyone access, use a simple user
  94. name/password scheme, or control access using AppleScript. With the latter
  95. method you execute a AppleScript, which can do anything, to authenticate the
  96. user. The important thing to remember is that the script should return TRUE
  97. if access is given, nil otherwise.
  98.     The ScriptLink client, which runs on a Newton, uses less than 30K. Though
  99. it displays an icon in the Extras folder, you do not click on it. Think of it
  100. as a function library that you access via NewtonScript. The library consists
  101. of eight functions and callbacks. They handle connections, data transfers,
  102. status inquiries, callbacks and disconnections.
  103.     The connection between the client and server is done via AppleTalk.
  104. According to email that I received from Momentum, the next version of
  105. ScriptLink will support serial connections, modems and wireless technologies
  106. such as Mobitex and RAM. Also in development is a version of ScriptLink that
  107. supports the ETE Communicator (a combination cellular phone, fax machine and
  108. global positioning system for the Newton). If this technology becomes a
  109. reality, Newton will be the leading PDA with true wireless technology. 
  110.     I happen to have Photonic’s wireless networking hardware in my apartment.
  111. It’s designed to give Macintoshes wireless AppleTalk networking capabilities.
  112. [See Vernon Huang’s review of the Photonics hardware elsewhere in this issue.
  113. Ed.] Since I have a battery pack for one of the transceivers, I decided to
  114. plug it in to the Newton and give ScriptLink a whirl. Without so much as a
  115. whimper, the two (ScriptLink software and Photonics hardware) worked
  116. flawlessly together, at least with the samples I tried. I must admit its very
  117. satisfying to sit across a room with a Newton, push a button and watch a
  118. Macintosh go into action.
  119.  
  120. Testing 1, 2 ,3
  121. Momentum includes three samples programs complete with source code (bonus!).
  122. They range in complexity from beginner to intermediate. The first sample
  123. contains three buttons along the bottom of the application (see Figure 2).
  124. The buttons make a connection with a ScriptLink server, send some AppleScript
  125. code and disconnect. The window above the buttons displays any returned data
  126. that results from running an AppleScript. 
  127.     I used this sample of code to try some AppleScripts of my own. Though I
  128. am new to AppleScript, with the help of Danny Goodman’s The Complete
  129. AppleScript Handbook I created some useful scripts that I tested successfully
  130. with ScriptLink.
  131.     All AppleScript code should be created using Apple’s Script Editor. Once
  132. you are sure it works, then fire up NTK to insert the code into a package.
  133. The easiest way to create AppleScript on the Newton is to place the code in
  134. its own slot in the base view. Subsequently, when you call the function to
  135. send the script, you reference the slot where the code resides. Currently,
  136. ScriptLink supports scripts of less than 2K in size. If you need to execute
  137. longer scripts, you must break them down into smaller pieces, each within its
  138. own slot. Version 1.1 of ScriptLink will allow packet sizes of up to 32K,
  139. removing this barrier. Momentum said that the new version will be available
  140. at no cost for registered users of version 1.0.
  141.     All of the code that I tried worked without incident. The ScriptLink
  142. client functions and sample code performed well. In fact, I believe you need
  143. to look at the ScriptLink server on the Mac as the weakest link. Since it is
  144. responsible for handling multiple Newton requests and the compilation and
  145. execution of AppleScripts, I looked for problems within that program. From
  146. what I could discern, it ran well. 
  147.  
  148. So What’s Wrong With It?
  149. The question isn’t so much “What’s wrong with ScriptLink,” its “What else
  150. could have been included?” The 2K packet limit is frustrating, but that
  151. problem will be resolved with the next release. There is no way to send a
  152. graphics file from a Mac to a Newton. If your application queries a database
  153. and the result is an image of some sort, there’s no simple way to get that
  154. picture or graph to the Newton. The gentleman I received email from at
  155. Momentum said he would mention that problem to the development team. Keep
  156. your fingers crossed.
  157.  
  158. In Summary
  159. Would it be too bold to say that ScriptLink is the most significant product
  160. for the Newton since the introduction of the Newton? In one fell swoop, the
  161. Newton’s memory constraints have been indirectly eliminated. You now have
  162. access to any scriptable database, spreadsheet, word processor or other
  163. application. You have the freedom of remotely uploading and downloading
  164. information to and from Macintoshes using an understandable, but robust
  165. scripting language. The power to bypass the Newton Connection Kit for data
  166. transfers is yours. Any application that you write for the Newton can now
  167. have its data sent directly to any scriptable Mac application. 
  168.     At the beginning of this article, before I reviewed this product, I
  169. stated that ScriptLink could single-handedly create new software companies.
  170. After completing this review I believe that this is true. I know I have at
  171. least have a dozen ideas for vertical applications in mind as I write this.
  172. Excuse me while I continue with my AppleScript lessons –software glory
  173. awaits. 
  174.  
  175. Scott is a recent graduate of the University of Michigan with a degree in
  176. Computer Engineering. He is currently working at Procter and Gamble as an
  177. internal consultant for the finance and accounting department, supporting
  178. their PCs and technology needs. Scott spends his spare time programming the
  179. Newton, weightlifting, in-line skating, reading and playing tennis with
  180. friends.
  181.  
  182.